home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
Pakiet bezpieczenstwa
/
mini Pentoo LiveCD 2006.1
/
mpentoo-2006.1.iso
/
livecd.squashfs
/
usr
/
lib
/
gkismet
/
Misc.pm
< prev
next >
Wrap
Text File
|
2005-10-20
|
1KB
|
61 lines
#!/usr/bin/perl -w
#
# $Id: Misc.pm,v 1.15 2005/05/31 22:06:53 solovam Exp $
#
# This file is a part of gkismet
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
# Misc definitions
#
package Misc;
use strict;
use Exporter;
our(@ISA, @EXPORT, $true, $false, $version, $mileFactor, $footFactor);
@ISA = qw(Exporter);
@EXPORT = qw($true $false $version $mileFactor $footFactor);
$false = 0;
$true = 1;
$version = '0.0.10';
# There some other mile definition that has .344. What a mess!
$mileFactor = 1609.347;
# This one is an exact value
$footFactor = 0.3048;
#
# Pow function
#
sub pow
{
my $type = shift;
my($val, $power) = (@_);
return exp(log($val) * $power);
}
#
# Just log base 10
#
sub log10 {
my $type = shift;
my $n = shift;
return log($n)/log(10);
}
1;